<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
	<Script file="TabCharacters.lua"></Script>

 	<Button name="AltoViewIconTemplate" virtual="true">
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Layers>
			<Layer level="BORDER">
				<Texture name="$parentIconTexture"/>
				<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
					<Anchors>
						<Anchor point="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-5" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentShine" inherits="AutoCastShineTemplate">
				<Anchors>
					<Anchor point="CENTER">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Size>
					<AbsDimension x="28" y="28"/>
				</Size>
			</Frame>
		</Frames>
		<Scripts>
			<OnEnter>
				if self.text then
					AltoTooltip:ClearLines();
					AltoTooltip:SetOwner(self, "ANCHOR_RIGHT");
					AltoTooltip:AddLine(self.text,1,1,1);
					AltoTooltip:Show();
				end
			</OnEnter>
			<OnLeave>
				AltoTooltip:Hide();
			</OnLeave>
			<OnClick>
				Altoholic.Tabs.Characters:MenuItem_OnClick(self, button)
			</OnClick>
		</Scripts>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
	</Button>

	<Button name="AltoTabCharactersIconTemplate" inherits="AltoMenuIconTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				Altoholic.Tabs.Characters:Icon_OnEnter(self)
			</OnEnter>
		</Scripts>
	</Button>
	
	<Button name="AltoTabCharactersClassIconTemplate" inherits="AltoBagItemTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				Altoholic.Tabs.Characters:ClassIcon_OnEnter(self)
			</OnEnter>
			<OnLeave>
				AltoTooltip:Hide()
			</OnLeave>
		</Scripts>
	</Button>
	
	<Frame name="AltoholicTabCharacters" parent="AltoholicFrame" hidden="true">
		<Size>
			<AbsDimension x="758" y="447"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset x="0" y="0" />
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentText1" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size>
						<AbsDimension x="100" y="18"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="35" y="-105"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentStatus" inherits="GameFontNormal" justifyH="LEFT">
					<Size x="320" y="24" />
					<Anchors>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-250" y="13" />
						</Anchor>
					</Anchors>
					<Color r="255" g="255" b="255" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<!-- Menu Icons -->
			<Button name="$parent_CharactersIcon" inherits="AltoTabCharactersIconTemplate" id="1">
				<Anchors>
					<Anchor point="LEFT" relativeTo="AltoholicFrameSearchLabel" relativePoint="RIGHT" >
						<Offset x="60" y="-15" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_BagsIcon" inherits="AltoTabCharactersIconTemplate" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_CharactersIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_QuestsIcon" inherits="AltoTabCharactersIconTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_BagsIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_TalentsIcon" inherits="AltoTabCharactersIconTemplate" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_QuestsIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_AuctionIcon" inherits="AltoTabCharactersIconTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_TalentsIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_MailIcon" inherits="AltoTabCharactersIconTemplate" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_AuctionIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_SpellbookIcon" inherits="AltoTabCharactersIconTemplate" id="7">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_MailIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_ProfessionsIcon" inherits="AltoTabCharactersIconTemplate" id="8">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_SpellbookIcon" relativePoint="TOPRIGHT" >
						<Offset x="5" y="0" />
					</Anchor>
				</Anchors>
			</Button>
		
			<Frame name="$parentRightClickMenu1" inherits="AltoRightClickMenuTemplate" id="1" />
			<Frame name="$parentRightClickMenu2" inherits="AltoRightClickMenuTemplate" id="2" />
			<Frame name="$parentRightClickMenu3" inherits="AltoRightClickMenuTemplate" id="3" />
			<Frame name="$parentRightClickMenu4" inherits="AltoRightClickMenuTemplate" id="4" />
			<Frame name="$parentRightClickMenu5" inherits="AltoRightClickMenuTemplate" id="5" />
			<Frame name="$parentRightClickMenu6" inherits="AltoRightClickMenuTemplate" id="6" />
			<Frame name="$parentRightClickMenu7" inherits="AltoRightClickMenuTemplate" id="7" />
			<Frame name="$parentRightClickMenu8" inherits="AltoRightClickMenuTemplate" id="8" />

			<!-- Left Menu -->
			<!--
			Future menu with character icons on the left
			
			<Button name="$parent_Test1" inherits="AltoMenuNamedIconTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="30" y="-165" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Test2" inherits="AltoMenuNamedIconTemplate" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Test1" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Test3" inherits="AltoMenuNamedIconTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Test2" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Test4" inherits="AltoMenuNamedIconTemplate" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Test3" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Test5" inherits="AltoMenuNamedIconTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Test4" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Test6" inherits="AltoMenuNamedIconTemplate" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Test5" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="0" />
					</Anchor>
				</Anchors>
			</Button>
			-->
			
			<Frame name="$parent_SelectRealm" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentText1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="-25" y="-2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						UIDropDownMenu_SetWidth(self, 120) 
						UIDropDownMenu_SetButtonWidth(self, 20)
						
						local realm = GetRealmName()
						UIDropDownMenu_SetSelectedValue(self, "Default|".. realm)
						UIDropDownMenu_SetText(self, realm)
						Altoholic:DDM_Initialize(self, Altoholic.Tabs.Characters.DropDownRealm_Initialize)
					</OnLoad>
				</Scripts>
			</Frame>
			
			<Button name="$parent_Characters" inherits="AltoViewIconTemplate" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="AltoholicTabCharacters" relativePoint="BOTTOMLEFT" >
						<Offset x="30" y="240" />
					</Anchor>
				</Anchors>
			</Button>

			<Button name="$parent_Sort1" inherits="AltoSortButtonTemplate" id="1">
				<Size>
					<AbsDimension x="130" y="19"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="AltoholicFrame_SearchEditBox" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="10" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Sort2" inherits="AltoSortButtonTemplate" id="2">
				<Size>
					<AbsDimension x="70" y="19"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent_Sort1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Sort3" inherits="AltoSortButtonTemplate" id="3">
				<Size>
					<AbsDimension x="100" y="19"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent_Sort2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Sort4" inherits="AltoSortButtonTemplate" id="4">
				<Size>
					<AbsDimension x="100" y="19"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent_Sort3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>

		</Frames>
		<Scripts>
			<OnLoad>
				Altoholic.Tabs.Characters:OnLoad()
			</OnLoad>
			<OnShow>
				Altoholic.Tabs.Characters:OnShow()
			</OnShow>
			<OnHide>
				DropDownList1:Hide()
			</OnHide>
		</Scripts>
	</Frame>
	
</Ui>